package com.anlu.base.system.legacy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Service
public class LegacyShop {

    @Autowired
    private LegacyStore store;

    public void placeOrder(LegacyOrder legacyOrder){
        store.put(legacyOrder.getId(),legacyOrder);
    }

    public Optional<LegacyOrder> findOrder(String orderId){
        return store.get(orderId);
    }


}
